<div id="txt"></div>
<audio id="audio_duration" src="https://quadpixels.github.io/combomp3/ysyy.mp3"></audio>
<style>
  #txt{
    white-space: pre;
  }
</style>
<script>
cs  = [
[['风晴雪','天鹿城'],'荒魂述',4,'hhs'],
[['襄铃','青丘尘中记'],'青丘有狐',4,'qqyh'],
[['襄铃','红叶湖'],'清馨戏蝶',4,'qxxd'],
[['馋鸡','乐无异'],'沧海飞尘',4,'chfc'],
[['悭臾','赤水'],'空徊',4,'kh'],
[['欧阳少恭','梦魂枝'],'烂柯',4,'lk'],
[['阿翔','百里屠苏'],'飞羽凌杀',4,'fyls'],
[['北洛','云无月'],'静水流深',4,'jsls'],
[['缙云','北洛'],'昨日影',4,'zry'],
[['玄戈&霓商','北洛'],'参商交辉',4,'ssjh'],
[['天鹿城','北洛'],'来日可期',4,'lrkq'],
[['太岁','北洛'],'杀伐之剑',4,'sfzj'],
[['北洛','原天柿'],'得力帮手',4,'dlbs'],
[['云无月','白梦泽'],'独歌',4,'dg'],
[['云无月','梦魂枝'],'无梦之魇',4,'wmzy'],
[['鄢陵','岑缨'],'鸿雁于飞',4,'hyyf'],
[['原天柿','岑缨'],'一见喜',4,'yjx'],
[['画板','岑缨'],'澄心若璃',4,'cxrl'],
[['姬轩辕','岑缨'],'吾道不孤',4,'wdbg'],
[['姬轩辕','嫘祖'],'昔年之乐',4,'xnzl'],
[['姬轩辕','有熊'],'轩辕氏',4,'xys'],
[['姬轩辕','鼎湖'],'龙去鼎湖',4,'lqdh'],
[['缙云','云无月'],'云本无心',4,'ybwx'],
[['太岁','缙云'],'千锋辟易',4,'qfby'],
[['巫炤','司危'],'邃古遗幽',4,'sgyy'],
[['半魂莲','巫炤'],'恨生天地',4,'hstd'],
[['天鹿城','玄戈&霓商'],'星坠',4,'xz'],
[['天鹿','玄戈&霓商'],'镇厄',4,'ze'],
[['西陵','嫘祖'],'烽烟锁城',4,'fysc'],
[['刘兄','阳平'],'妙笔退魔',4,'mbtm'],
[['刘兄','青丘尘中记'],'神游狐乡',4,'syhx'],
[['天鹿','天鹿城'],'却邪',4,'qx'],
[['西陵','有熊'],'人世星火',4,'rsxh'],
[['半魂莲','巫之国'],'天星尽摇',4,'txjy'],
[['半魂莲','阳平'],'黑莲厄',4,'hle'],
[['半魂莲','无名之地'],'苏生之罪',4,'sszz'],
[['玉梳','司危'],'负青丝',5,'fqs'],
[['百里屠苏','红叶湖','襄铃'],'尾巴尖儿',10,'wbje'],
[['白梦泽','北洛','云无月'],'宿世秋',10,'ssq'],
[['刘兄','巫之国','北洛'],'玳之梦',10,'dzm'],
[['姬轩辕','缙云','有熊'],'以玉为戈',10,'yywg'],
[['姬轩辕','赤水','嫘祖'],'赤水遗珠',10,'csyz'],
[['缙云','白梦泽','云无月'],'刺荆心',10,'jjx'],
[['司危','玉梳','嫘祖'],'生辰礼',10,'scl'],
[['无名之地','西陵','巫之国'],'巫之血',10,'wzx'],
[['谢衣','沈夜','捐毒','乐无异'],'往事浮沙',20,'wsfs'],
[['姬轩辕','北洛','云无月','岑缨'],'首山梦时书',20,'ssmss'],
[['姬轩辕','缙云','嫘祖','鼎湖'],'眠霜卧雪',20,'mswx'],
[['姬轩辕','缙云','巫炤','嫘祖'],'故梦',20,'gm'],
[['西陵','巫炤','司危','嫘祖'],'西陵曲',20,'xlq']
];
var myVid = document.getElementById("audio_duration");
var div = document.getElementById("txt");
var size = cs.length;
var i = -1;
function duration(){
  i++;
  if(i==size) return;
  myVid.src = g_resource_prefix + "combomp3/" + cs[i][3] + ".mp3";
  myVid.load();
  myVid.oncanplay = function () {
   //div.textContent += i + ": " +  myVid.duration*1000 + "\n";
   console.log(i);
   cs[i].push(myVid.duration*1000);
  }
  setTimeout(duration, 500);
}
duration();
setTimeout(function(){
for(var k=0; k<cs.length; k++){
  var c = cs[k];
  div.textContent += "[[";
  for(var j=0; j<c[0].length; j++){
   div.textContent += "'" + c[0][j] + "'";
   if(j != c[0].length -1)
    div.textContent += ",";
   }
   div.textContent += "]";
   for(var j=1; j<c.length; j++){
     div.textContent += ",";
     if(j%2 == 1)
       div.textContent += "'" + c[j] + "'";
     else
       div.textContent += c[j];
   }
   div.textContent += "],\n";
}
}, 50000);
</script>
